package com.intech.android.demo.cms.validators;


public class DoubleNumberValidator extends Validator
{
    private String number;
    private Double result;


    public DoubleNumberValidator(String number)
    {
        this.number = number;
    }


    public void check()
    {
        result = null;
        try
        {
            result = Double.valueOf(number);
        }
        catch (NumberFormatException e)
        {
            message = "Should be number";
            valid = false;
        }

    }

    public Double getDoubleValue()
    {
        return result;
    }

}
